#!/bin/bash
ftp_path=$1
echo ftp_path=$ftp_path
iconv -f utf-8 -t utf-8 release_note.txt > release_note_bak.txt
rm release_note.txt
mv release_note_bak.txt release_note.txt
repo_n=`echo $ftp_path |awk -F "output/" '{print $2}' |awk -F "/" '{print $1}'`
if [ "$repo_n" == "phoenix_send_sdk" -o "$repo_n" == "phoenix_sdk" ]; then
    curl -u aolingli:ALL1234! -T release_note.txt $ftp_path/public/
else
    curl -u aolingli:ALL1234! -T release_note.txt $ftp_path
fi
